Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [notify] Rewrite notification item delegate with paint method #1035

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

Kakueeen
Copy link
Contributor

@Kakueeen Kakueeen commented Jan 2, 2025

Refactored notification item delegate to use direct painting instead of widget-based
approach for better performance and visual consistency. Key changes include:

  • Removed widget-based item delegate implementation
  • Added custom paint methods for background, icon, text and buttons
  • Implemented mouse event handling for close button and action buttons
  • Added text layout handling with proper wrapping and elision
  • Introduced constants for layout metrics and spacing
  • Added new roles and data structure for action button info

The new implementation provides smoother scrolling and consistent styling while
reducing memory usage by eliminating widget creation for each item.

Log: Refactor notification item delegate to use paint-based rendering
Bug: https://pms.uniontech.com/bug-view-272445.html

Refactored notification item delegate to use direct painting instead of widget-based
approach for better performance and visual consistency. Key changes include:

- Removed widget-based item delegate implementation
- Added custom paint methods for background, icon, text and buttons
- Implemented mouse event handling for close button and action buttons
- Added text layout handling with proper wrapping and elision
- Introduced constants for layout metrics and spacing
- Added new roles and data structure for action button info

The new implementation provides smoother scrolling and consistent styling while
reducing memory usage by eliminating widget creation for each item.

Log: Refactor notification item delegate to use paint-based rendering
Bug: https://pms.uniontech.com/bug-view-272445.html
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart, Kakueeen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-ci-robot deepin-ci-robot merged commit e7eda41 into linuxdeepin:master Jan 3, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants